﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;
namespace BUS
{
    public class ChiTietPhong_SanPhamBUS
    {
        public const int ThanhCong = 1;
        public const int ThatBai = 0;
        public static int ThemChiTietPhong_SanPham(ChiTietPhong_SanPhamDTO chiTietPhong_SanPham)
        {
            if (!ChiTietPhong_SanPhamDAO.ThemChiTietPhong_SanPham(chiTietPhong_SanPham))
                return ThatBai;
            return ThanhCong;
        }
        public static int SuaChiTietPhong_SanPham(ChiTietPhong_SanPhamDTO chiTietPhong_SanPham)
        {
            if (!ChiTietPhong_SanPhamDAO.SuaChiTietPhong_SanPham(chiTietPhong_SanPham))
                return ThatBai;
            return ThanhCong;
            
        }
        public static bool XoaChiTietPhong_SanPham(int maCT)
        {
            return ChiTietPhong_SanPhamDAO.XoaChiTietPhong_SanPham(maCT);
        }
        public static List<ChiTietPhong_SanPhamDTO> LayDSChiTietPhong_SanPham(int maCT = -1, int maPhieuThuePhong = -1,int maSanPham  = -1)
        {
            return ChiTietPhong_SanPhamDAO.LayDSChiTietPhong_SanPham(maCT, maPhieuThuePhong,maSanPham);
        }
    }
}
